package com.shxy.service.impl;

import com.shxy.dao.RetireeDao;
import com.shxy.entity.Retiree;
import com.shxy.service.IRetireeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;

/**
 * 退休人员管理类
 */
@Service
public class RetireeService implements IRetireeService {
    @Autowired
    private RetireeDao retireeDao;

    @Override
    public Page<Retiree> list(int page, int size) {
        return retireeDao.findAll(PageRequest.of(page - 1, size));
    }
}
